package org.realogic.cfm.persistence;

import javax.sql.DataSource;

/**
 * 数据源注册器. 此类用于向系统中的数据源仓库注册一个数据源.
 * 
 */
public class KDataSourceRegister {
	// 数据库DataSource
	private DataSource dataSource = null;

	// 数据源名称
	private String dataSourceName = null;

	// MyBatis SqlSessionFactory名称
	private String sqlSessionFactoryName = null;

	// 是否默认数据源
	private boolean asDefault = false;

	public KDataSourceRegister() {

	}

	public DataSource getDataSource() {
		return dataSource;
	}

	public String getDataSourceName() {
		return dataSourceName;
	}

	public void setDataSourceName(String dataSourceName) {
		this.dataSourceName = dataSourceName;
	}

	public String getSqlSessionFactoryName() {
		return sqlSessionFactoryName;
	}

	public void setSqlSessionFactoryName(String sqlSessionFactoryName) {
		this.sqlSessionFactoryName = sqlSessionFactoryName;
	}

	public boolean isAsDefault() {
		return asDefault;
	}

	public void setAsDefault(boolean asDefault) {
		this.asDefault = asDefault;
	}

	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}

}
